package com.example.CollaborativeDiscussionLearning.service.courseService;

import com.example.CollaborativeDiscussionLearning.entity.Course;
import com.example.CollaborativeDiscussionLearning.mapper.CourseMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 课程服务实体类
 * */
@Slf4j
@Service
public class CourseServiceImpl implements CourseService {

    @Autowired
    private CourseMapper courseMapper;
    @Override
    public int insert(Course course) {
        return courseMapper.insert(course);
    }

    @Override
    public int delete(Integer id) {
        return courseMapper.delete(id);
    }

    @Override
    public int updateCourse(Course course) {
        return courseMapper.updateCourse(course);
    }

    @Override
    public Course query(Course course) {
        return courseMapper.query(course);
    }
    @Override
    public Course queryById(Integer id) {
        return courseMapper.queryById(id);
    }

}
